<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JavaScript异步编程</title>
    <script src="./js/js10_oojs.10.js" async></script>
    <link rel="stylesheet" href="./style/common.css">
</head>
<body>
    <h1>async / await关键字</h1>
    <p class="msg"></p>
</body>
<script>
    document.addEventListener("DOMContentLoaded",function(){
        let msg=document.querySelector(".msg");
        hello1().then(data=>{
            msg.innerHTML+=`${data}<br>`;
        });
        hello2().then(data=>{
            msg.innerHTML+=`${data}<br>`;
        });

        handleStart().then(value=>{
            msg.innerHTML+=`${value.msg},执行时间:${value.time}<br>`;
        });
    });
</script>
</html>